<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 沉溺
  Date: 2021/10/24
  Time: 23:09
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="UTF-8">
    <title>预售卡</title>
    <link type="text/css" rel="stylesheet" href="fontsawesome/css/font-awesome.css"/>
    <link type="text/css" rel="stylesheet" href="css/style.css"/>
</head>
<body>
<div class="main_box">
    <h2><span></span>添加预售卡</h2>
    <div class="cont_box">
        <form action="${pageContext.request.contextPath}/addSell_pet" >
            <ul class="addpro_box">
                <li>
                    <label>预售卡卡种：</label>
                    <select name="pet_card" required data-msg-required="预售卡卡种不能为空">
                        <option value="">请选择</option>
                        <option value="储值卡">储值卡</option>
                        <option value="年卡">年卡</option>
                        <select>
                </li>
                <li>
                    <label>储值卡种类：</label>
                    <select name="pet_ykind" required data-msg-required="储值卡种类不能为空">
                        <option value="">请选择</option>
                        <option value="洗车储值卡">洗车储值卡</option>
                        <option value="都市储值卡">都市储值卡</option>
                        <select>
                </li>
                <li>
                    <label>年卡种类：</label>
                    <select name="pet_kind" required data-msg-required="年卡种类不能为空">
                        <option value="">请选择</option>
                        <option value="年卡种类一">年卡种类一</option>
                        <option value="年卡种类二">年卡种类二</option>
                        <select>
                </li>
                <li>
                    <label>卡号：</label>
                    <input type="text" placeholder="请输入预售卡卡号" name="pet_id" required data-rule-sellcard="true" data-msg-required="预售卡卡号不能为空"/>
                </li>
                <li>
                    <label>充值金额：</label>
                    <input type="text" name="money" />
                </li>
                <li>
                    <label>是否支付：</label>
                    <div class="radio_box">
                        <i class="fa fa-check-circle fa-1x"></i>
                        <input type="radio" name="status" class="input_radio" checked="checked"/><span>已支付</span>
                    </div>
                    <div class="radio_box">
                        <i class="fa fa-circle-thin fa-1x"></i>
                        <input type="radio" name="status" class="input_radio"/><span>未支付（送客户）</span>
                    </div>
                </li>
                <li>
                    <label>销售：</label>
                    <select name="ename">
                        <option value="">请选择</option>
                        <c:forEach items="${emps}" var="emp">
                        <option value="${emp.ename}">${emp.ename}</option>
                        </c:forEach>
                        <select>
                </li>
            </ul>
            <div class="probtn_box clearfix">
                <input type="submit" value="添加预售卡" class="btn blue_btn submit"/>
            </div>
        </form>
    </div>
</div>
<!--javascript include-->
<script src="js/jquery-2.2.1.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/bootstrap-datepicker.js"></script>
<script src="js/jquery.validate.min.js"></script>
<script src="js/jquery.form.min.js"></script>
<script src="js/other.js"></script>
`<script>
    $(function(){
        $("body").other({formId:"#presell_form",formUrl:"presell_Card.jsp"});//formUrl 表单请求地址
        //卡种显示隐藏
        $("select[name='pet_ykind']").parent().hide();
        $("select[name='pet_kind']").parent().hide();
        $("select[name='pet_card']").change(function(){
            var now = $(this).val();
            if(now == "储值卡"){
                $("select[name='pet_ykind']").prop("disabled",false).parent().show();
                $("select[name='pet_kind']").prop("disabled",true).parent().hide();
            }else if(now == "年卡"){
                $("select[name='pet_kind']").prop("disabled",false).parent().show();
                $("select[name='pet_ykind']").prop("disabled",true).parent().hide();
            }else{
                $("select[name='pet_kind']").parent().hide();
                $("select[name='pet_ykind']").parent().hide();
            }
        });
    });
</script>`
</body>
</html>
